GtkTextView: use GSlice to allocate GtkTextLineSegment's
authorSébastien Wilmet <swilmet@gnome.org>
Fri, 11 Apr 2014 15:45:50 +0000 (17:45 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Apr 2014 21:04:12 +0000 (14:04 -0700)
commit983a03d5f85f4e10f5392df2fd2de0c0bf670f7d
treebcfda4f1b7553c5f0f40b4c5a6d76ec9e8615b2d
parentd69d57afa7d1966ab5ebc26bfe9eb1b24ba01571
GtkTextView: use GSlice to allocate GtkTextLineSegment's

Use GSlice to allocate all types of segments:
- char
- toggle
- mark
- pixbuf
- child widget

Char segments are a bit more complicated because the length of the text
is determined at run time and stored in the 'byte_count' field. If the
text is long, GSlice will call the system malloc() anyway, so it's
better to always use GSlice for GtkTextLineSegment.

Toggle segments are also freed in gtktextbtree.c, hence the function
_gtk_toggle_segment_free() (for a later commit it would be nice to
rename those functions with the _gtk_text prefix).

https://bugzilla.gnome.org/show_bug.cgi?id=727908
gtk/gtktextbtree.c
gtk/gtktextchild.c
gtk/gtktextmark.c
gtk/gtktextsegment.c
gtk/gtktextsegment.h